<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
?>

  <div class="container">
    <div class="row">
       <?php echo $this->render('_leftnav'); ?>
        <div class="col-md-10">
          <div class="page-header clearfix">
            <h1 class="pull-left">软件分类</h1>
            <div class="pull-right">
				<a class="btn btn-success btn-sm" href="<?=Url::toRoute(['download/softcatelist']);?>">分类列表</a>
				 <!-- <?php if(Yii::$app->session->hasFlash('success')): ?>	
				 						<?= Yii::$app->session->getFlash('success') ?>						
				 <?php endif; ?> -->
            </div>
          </div>

  <fieldset>
	<?php
	$form = ActiveForm::begin([
	'action' => ['download/softcateupd','id'=>$cate['softcate_id']],
	'method'=>'post',
	'options' => [
					'enctype' => 'multipart/form-data',
					'class'=>'form-horizontal'
				 ],
	'fieldConfig' => [
                       'template' => '<div class="form-group"><div class="col-md-2 control-label">{label}</div><div class="col-md-8 controls">{input}{error} </div></div>'
					 ], 
		]);	
	?>

	<?php echo $form->field($model, 'softcate_name', ['inputOptions' => ['class' => 'form-control', 'placeholder' => '请入分类名','value' => $cate['softcate_name']]])->textInput(['maxlength' => 20]) ?>	

	<?php echo $form->field($model, 'softcate_sort', ['inputOptions' => ['class' => 'form-control', 'value' => $cate['softcate_sort']]])->textInput() ?>	

	<?php $model->softcate_status = $cate['softcate_status'] ?>
	<?=$form->field($model, 'softcate_status',['template'=>'<div class="form-group">
    <div class="col-md-2 control-label">{label}</div><div class="controls col-md-8 radios">  {input}</div></div>'])->radioList(['1'=>'开启','0'=>'关闭']) ?>	

     <div class="form-group">
      <div class="row form-group">
		 <div class="controls col-md-offset-2 col-md-8">     
	  <?= Html::submitButton('提交', ['class'=>'btn btn-primary']) ?>
		 </div>
      </div>    
	</div>
	</fieldset>
<?php ActiveForm::end(); ?>
  </div>
